//
//  ViewController.m
//  jiexi
//
//  Created by dllo on 15/11/9.
//  Copyright (c) 2015年 liyinkai. All rights reserved.
//

#import "ViewController.h"
#import "FirstModel.h"
#import "SecondModel.h"
@interface ViewController ()
@property (nonatomic, copy) NSMutableArray *array;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    // Do any additional setup after loading the view, typically from a nib.
    NSArray *array = [[NSArray alloc] initWithContentsOfFile:@"/Users/dllo/Desktop/work/ui12homework/jiexi/jiexi/lwsb.plist"];
    _array = [[NSMutableArray alloc] init];
    for (NSDictionary *dic in array) {
        FirstModel *first = [[FirstModel alloc] init];
        [first setValuesForKeysWithDictionary:dic];
        [_array addObject:first];
    }
    FirstModel *a = _array[0];
    SecondModel *b = a.datasource[0];
    NSLog(@"%@", b.title);
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
